<script src="resources/js/md5.js"></script>
<form id="formlogin" action="formtarget/dologin.jsp">
        	<div><label for="user">Usuario</label><input name="user" id="user" type="text" /></div>
        	<div><label for="pass_raw">Constrase&ntilde;a</label><input name="pass_raw" id="pass_raw" type="password" /><input type="hidden" name="pass" id="pass" /></div>        	
        	<div><input type="submit" value="entrar" /></div>
        	<div><a href="restorepass.jsp">Recuperar Contrase&ntilde;a</a></div>
        	<div><a href="register.jsp">Registrarse</a></div>
</form>

<script>
$("#formlogin").submit(function (){
	var pass = $.md5($("#pass_raw").val()); 
    //alert( "Password:" + pass );
    $("#pass").val(pass);
});
</script>